package com.spacearcade.logic;

/**
 *
 * @author JeKa
 */
public class Dot extends Pair {

	public Dot(double x, double y) {
		super(x, y);
	}

	public double getX(double centreX, double angle) {
		return this.x * Math.cos(angle) - this.y * Math.sin(angle) + centreX;
	}

	public double getY(double centreY, double angle) {
		return this.x * Math.sin(angle) + this.y * Math.cos(angle) + centreY;
	}

	@Override
	public String toString() {
		return String.format("%3.2f - %3.2f\n", x, y);
	}
}
